package huixue.cn.com.rxapp.rx;

import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import butterknife.BindView;
import huixue.cn.com.rxapp.R;
import huixue.cn.com.rxapp.base.SimpleActivity;
import huixue.cn.com.rxapp.helper.BottomNavigationViewHelper;

public class NavigationViewActivity extends SimpleActivity {

    @BindView(R.id.bottomView)
    public BottomNavigationView mNavigationView;

    @Override
    public int getLayout() {
        return R.layout.activity_navigation_view;
    }

    @Override
    public void initView() {
        mNavigationView.setItemIconTintList(null);
        //BottomNavigationViewHelper.adjustNavigationIcoSize(mNavigationView,this);
        BottomNavigationViewHelper.disableShiftMode(mNavigationView,this,18);
        BottomNavigationViewHelper.addNumberIcon(mNavigationView,this,5);
    }

    @Override
    public void addEvent() {
        mNavigationView.setOnNavigationItemSelectedListener(item -> {
            switch (item.getItemId()){
                case R.id.tab_home:
                    return true;
                case R.id.tab_market:
                    return true;
                case R.id.tab_exchagne:
                    return true;
                case R.id.tab_assert:
                    return true;
                case R.id.tab_account:
                    return true;
            }
            return false;
        });

    }
}
